﻿@model AutomatedTestDataManagement.Models.Page

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>Page</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.PageName)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.PageName)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.PagePath)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.PagePath)
    </div>
    <div class="display-label">
        @Html.LabelFor(model => model.PagesFields)
    </div>
    <div class="display-field">
       <table>
           <tr>
               <th>Field Name</th>
               <th>Field Type</th>
           </tr>
           @foreach (var item in Model.PagesFields)
           {
               <tr>
                   <td>
                       @Html.DisplayFor(modelItem => item.HTMLField.FieldName)
                   </td>
                   <td>
                       @Html.DisplayFor(modelItem => item.HTMLField.FieldType.FieldTypeName)
                   </td>
               </tr>
           }
        </table>
    </div>
</fieldset>
<p>
    @Html.ActionLink("Edit", "Edit", new { id=Model.PageID }) |
    @Html.ActionLink("Back to List", "Index")
</p>
